import axios from "axios";
const instance = axios.create({
  baseURL: "http://localhost:3000", //域名
  timeout: 5000, // 超时时间
});

// 封装推荐电台请求
export const reqRadioApi = (params) => instance.get("/dj/hot", { params });
// 封装听听电台请求
export const reqListenApi = (params) =>
  instance.get("/dj/program/toplist", { params });
//封装电台分类请求
export const reqTypeApi = (params) => instance.get("/dj/catelist", { params });

// 封装post请求
export const post = (url, data) => instance.post(url, data);

// 删除
export const dele = (url, params) => instance.delete(url, { params });
